import request from '@/utils/request'

// 查询信用卡账单列表
export function listCreditCardBill(query) {
  return request({
    url: '/invest/creditCardBill/list',
    method: 'get',
    params: query
  })
}

// 查询信用卡账单详细
export function getCreditCardBill(id) {
  return request({
    url: '/invest/creditCardBill/' + id,
    method: 'get'
  })
}

// 新增信用卡账单
export function addCreditCardBill(data) {
  return request({
    url: '/invest/creditCardBill',
    method: 'post',
    data
  })
}

// 修改信用卡账单
export function updateCreditCardBill(data) {
  return request({
    url: '/invest/creditCardBill',
    method: 'put',
    data
  })
}

// 删除信用卡账单
export function delCreditCardBill(id) {
  return request({
    url: '/invest/creditCardBill/' + id,
    method: 'delete'
  })
}

// 手动更新信用卡账单
export function updateUnpaidCreditBill() {
  return request({
    url: '/invest/job/generateUnpaidCreditBill',
    method: 'post'
  })
}
